#!/usr/bin/env python
#coding=utf-8
'''
输入一个列表，定义一个函数，使其排序
'''
#输入一个列表
#li = []
#print('请输入一个列表;输入‘<’退出')
import nester
 
while True:
     ch = input(">")
     lml = sorted(ch)
     lst = nester.lml_sort(ch)
     print(lst)
     print(lml)
     if ch == '<':
         break
     with open('test.txt', 'w') as f:
       f.write(ch)
       f.close()
'''
#模块内容     
def lml_sort(the_list):
        if not isinstance(the_list, list):
            return 'pless give list'
        else:
            lenght = len(the_list)
            for i in range(0, lenght):
                for j in range(i+1, lenght):
                    if the_list[i] > the_list[j]:
                       the_list[i],the_list[j] = the_list[j],the_list[i]
        return the_list
'''
#lst = [3,5,2,-1]
#print(lml_sort(lst))
